\documentclass{article}

\usepackage{algorithmic}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{booktabs}

\begin{document}

\title{Naive Bayes Handwriting Recognition}
\author{Geoffrey Ulman\\
        Homework 7\\
        CSI873}
\date{November 2011}
\maketitle

\section{Results}\label{Results}

A testing error rate of \(0.388\) and a training error rate of \(0.322\) was achieved by the Naive Bayes classifier with 95\% confidence intervals given by Table \ref{error}. On a digit-by-digit basis, error was relatively uniform among the digits, with ``4'' and ``5'' being significant exceptions (see Figure \ref{trainconfusion} for the training data confusion matrix and Figure \ref{testconfusion} for the testing data confusion matrix). In the case of ``5'' misclassification were spread over a number of digits. In the case of ``4'' almost all the misclassification were misclassifying ``4'' as ``9'' (see Figures \ref{4_9_missclass_training} and \ref{4_9_missclass_testing}).

Java (version 1.6.0\_27) was used to implement the Naive Bayes classifier. As with the midterm project, the code is available as a Subversion repository on Google Code at \url{http://code.google.com/p/csi873/}. Compiling and running the code requires the Java build tool Maven (\url{http://maven.apache.org/}). Only the small amount of new code necessary to implement the Naive Bayes classifier is attached to this report.

\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{ConfusionMatrixTesting.png}
\caption{Confusion Matrix for Testing Data Set}
\label{testconfusion}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{ConfusionMatrixTraining.png}
\caption{Confusion Matrix for Training Data Set}
\label{trainconfusion}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{4-9-testing.png}
\caption{4s Misclassified as 9s in Testing Data Set}
\label{4_9_missclass_testing}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{4-9-training.png}
\caption{4s Misclassified as 9s in Training Data Set}
\label{4_9_missclass_training}
\end{figure}

\begin{table}
\caption{Misclassification Error}
\begin{center}
\begin{tabular}{llcc}
\toprule
Data Set & Error & \multicolumn{2}{c}{95\% Confidence Interval} \\
\cmidrule(r){3-4}
& & Lower Bound & Upper Bound \\
\midrule
Testing       & 0.388 &  0.341 & 0.435  \\
Training      & 0.322 &  0.291 & 0.352  \\
\bottomrule
\end{tabular}
\label{error}
\end{center}
\end{table}

\begin{thebibliography}{9}

\bibitem{cpl}
  Tom M. Mitchell,
  \emph{Machine Learning},
  WCB McGraw-Hill, Boston,
  1997.

\end{thebibliography}

\end{document}
